package org.iartisan.admin.template.dao.mapper;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.iartisan.admin.template.dao.model.JnlsTraceSequenceDO;
import org.iartisan.runtime.jdbc.MybatisBaseMapper;

/**
 * jnls_trace_sequence 表操作接口
 *
 * @author King
 */
public interface JnlsTraceSequenceMapper extends MybatisBaseMapper<JnlsTraceSequenceDO> {

    /**
     * 下一个序列
     *
     * @param seqName
     * @return
     */
    @Select("select nextval(#{seqName})")
    int nextval(@Param("seqName") String seqName);

    @Select("select currval(#{seqName})")
    int currval(@Param("seqName") String seqName);

    @Select("select setval(#{seqName},#{value})")
    int setval(@Param("seqName") String seqName, @Param("value") int value);

}